Information about the limit

This request is used to get detailed information about the limit.

Request syntax

GET https://b2b-api.go.yandex.ru/integration/2.0/limits?limit_id={limit_id}

Request headers

  • Authorization: Bearer <OAuth-token>
    OAuth access token. The steps to get a token are described in Getting started.
  • X-YaTaxi-Selected-Corp-Client-Id — client ID from the account. Required if multiple clients are available using the token.

Request parameters

The request may contain the following optional parameters:

  • limit_id: The id of the limit.

Response field description

Responses may contain the following fields:

Field

Description

Format

id

Limit ID.

String

title

The name of the limit.

String

client_id

Client ID.

String

department_id

ID of the department the limit applies to. If there is no department, it means this is the root department.

String

categories

The list of available service class categories. Specified only for the taxi and cargo services. List format: "category1","category2", ....

Array of strings

fuel_types

The list of available fuel types. Specified only for the tanker service. List format: "type1","type2", ....

Array of strings

limits

Limits.

Object

geo_restrictions

A block that contains information about geo restrictions.

Array of objects

time_restrictions

A block that contains information about time restrictions.

Array of objects

can_edit

Indicates whether the user can change or remove this limit.

Boolean

counters

The number of employees with this limit. An object with the structure {"users": <number>}.

Object

is_default

Indicates whether this limit is used by default (set when the service is activated for the client).

Boolean

service

ID of the service the limit is set for.

String

cities

Only specified for the drive service. The list of available cities.

Array

tariffs

Only specified for the drive service. The list of available service plans.

Array

car_classes

Only specified for the drive service. The list of available car classes.

Array

enable_toll_roads

Only specified for the drive service. Whether toll roads are available to the user.

Boolean

Structure of the limits object:

Field

Description

Format

orders_amount

A limit on the number of rides that the client can make during the period. Specified only for the taxi and cargo services.
An object with the structure {"value": <number>, "period": <period>}.
The period is set as a string, for example, "month".

Object

orders_cost

A limit on the amount that the client can spend during the period.

An object with the structure {"value": <number>, "period": <period>}.
The period is set as a string, for example, "month".

Object

Structure of the geo_restrictions array element:

Field

Description

Format

source

ID of the ride pickup region. If the field is left empty, then any region is allowed. At least the source or destination field must be filled in.

String

destination

ID of the ride destination region. If the field is left empty, then any region is allowed. At least the source or destination field must be filled in.

String

Structure of the time_restrictions array element:

Field

Description

Format

type

Restriction type. Acceptable values:

  • weekly_date: Restrictions on days of the week.

  • range_date: Restrictions by date.

String

days

Days of the week when ride orders are available. Acceptable values:

  • mo: Monday.

  • tu: Tuesday.

  • we: Wednesday.

  • th: Thursday.

  • fr: Friday.

  • sa: Saturday.

  • su: Sunday.

This field is only used for weekly_date type restrictions.

Array of strings

start_time

The time when the order becomes available. Value format: HH:MM:SS.
This field is only used for weekly_date type restrictions.

String

end_time

The time when the order will no longer be available. Value format: HH:MM:SS.
This field is only used for weekly_date type restrictions.

String

Request example

GET https://b2b-api.go.yandex.ru/integration/2.0/limits?limit_id=41...10
...
Authorization: Bearer <OAuth token>

Response example

The example of response for the Taxi service:

{
    "categories": [
        "cargo_hour",
        "child_tariff",
        "lite_b2b",
        "maybach",
        "minivan",
        "optimum_b2b",
        "premium_van",
        "standart_b2b",
        "ultimate",
        "vip"
    ],
    "time_restrictions": [],
    "geo_restrictions": [],
    "id": "41...10",
    "client_id": "a2...52",
    "service": "taxi",
    "title": "Taxi",
    "limits": {},
    "counters": {
        "users": 1
    },
    "is_default": true,
    "enable_toll_roads": true,
    "can_edit": true
}

The example of response for the Drive service:

{
    "id": "26...40",
    "client_id": "a2...52",
    "service": "drive",
    "title": "Carsharing trips",
    "limits": {
        "orders_cost": {
            "value": "10000",
            "period": "month"
        }
    },
    "counters": {
        "users": 1
    },
    "is_default": true,
    "cities": [
        "kzn",
        "msk",
        "sochi",
        "spb"
    ],
    "tariffs": [
        "fix_offer_regular",
        "flexible_pack_offer",
        "intercity_offer",
        "standart_offer"
    ],
    "cars_classes": [
        "cargo",
        "everyday",
        "holiday",
        "shuttle"
    ],
    "enable_toll_roads": true,
    "time_restrictions": [],
    "can_edit": true
}

The example of response for the Eats2 and Grocery services:

{
    "id": "99...f7",
    "client_id": "a2...52",
    "service": "eats2",
    "title": "Lunches and snacks",
    "time_restrictions": [
        {
            "type": "weekly_date",
            "start_time": "00:00:00",
            "end_time": "23:59:00",
            "days": [
                "sa",
                "su"
            ]
        },
        {
            "type": "weekly_date",
            "start_time": "00:00:00",
            "end_time": "23:59:00",
            "days": [
                "fr",
                "mo",
                "th",
                "tu",
                "we"
            ]
        },
        {
            "type": "weekly_date",
            "start_time": "00:00:00",
            "end_time": "23:59:00",
            "days": [
                "fr",
                "mo",
                "th",
                "tu",
                "we"
            ]
        },
        {
            "type": "weekly_date",
            "start_time": "00:00:00",
            "end_time": "23:59:00",
            "days": [
                "fr",
                "mo",
                "th",
                "tu",
                "we"
            ]
        }
    ],
    "geo_restrictions": [],
    "limits": {
        "orders_cost": {
            "value": "1000",
            "period": "month",
            "accumulation_rules": {
                "accumulation_period": "year"
            }
        }
    },
    "counters": {
        "users": 1
    },
    "is_default": true,
    "is_qr_enabled": false,
    "can_edit": true
}

Response codes

The response to this request may contain the following standard HTTP codes:

  • 200: Request completed successfully.

  • 400: An unknown parameter or a parameter with an invalid value was passed in the request.

  • 403:

    • SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header X-YaTaxi-Selected-Corp-Client-Id (returned if more than one client is available for the token).

    • SELECTED_CLIENT_ACCESS_DENIED: the header X-YaTaxi-Selected-Corp-Client-Id contains the client's ID, which this login does not have access to.

  • 404: The requested limit wasn't found.